package com.xykj.mapper;

import com.xykj.common.entry.ChinaIndex;
import com.xykj.common.entry.SectorFundFlow;
import com.xykj.pojo.dto.SectorFundFlowDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SectorFundFlowMapper {
    @Select("select sector_name as sectorName, " +
            "change_percent as changePercent," +
            "direction as direction " +
            "from sector_fund_flow where is_deleted=0 and direction=#{status} order by change_percent  LIMIT 0,3")
    List<SectorFundFlowDto> querySectorFundFlowByStatus(@Param("status") Integer status);


    /**
     * 爬虫存储数据
     * @param list
     */
    void batchInsert(List<SectorFundFlow> list);

    void batchDelete(@Param("ids") List<Long> ids);
    List<Long> selectExistingIds();
}
